91 research outputs found

    Shortcut fusion rules for the derivation of circular and higher-order programs

    Get PDF
    Functional programs often combine separate parts using intermediate data structures for communicating results. Programs so defined are modular, easier to understand and maintain, but suffer from inefficiencies due to the generation of those gluing data structures. To eliminate such redundant data structures, some program transformation techniques have been proposed. One such technique is shortcut fusion, and has been studied in the context of both pure and monadic functional programs. In this paper, we study several shortcut fusion extensions, so that, alternatively, circular or higher-order programs are derived. These extensions are also provided for effect-free programs and monadic ones. Our work results in a set of generic calculation rules, that are widely applicable, and whose correctness is formally established.Fundação para a Ciência e a Tecnologi

    Design, implementation and calculation of circular programs

    Get PDF
    Tese de doutoramento em Informática (ramo do Conhecimento Fundamentos da Computação)Circular programming is a powerful technique to express multiple traversal algorithms as a single traversal function in a lazy setting. Such a (virtual) circular program may contain circular definitions, that is, arguments of function calls that are also results of that same calls. Although circular definitions always induce non-termination under a strict evaluation mechanism, they can sometimes be immediately evaluated using a lazy evaluation strategy. The lazy engine is able to compute the right evaluation order, if that order exists. Indeed, using this style of circular programming, the programmer does not have to concern him/herself with the definition and the scheduling of the different traversal functions, since a single (traversal) function has to be defined. Moreover, because there is a single traversal function, the programmer does not have to define intermediate gluing data structures to convey values computed in one traversal and needed in following ones, either. In this Thesis, we present our studies on the design, implementation and calculation of circular programs. We start by developing techniques to transform circular programs into strict ones. Then, we introduce calculation rules to obtain circular programs from strict equivalents, both in the context of pure and monadic programming. Because we use calculation techniques we guarantee that the resulting circular programs are equivalent to the strict ones we start with. In this Thesis, we also perform a series of benchmarks comparing the running performances of circular programs and the programs we are able to derive from circular programs.A utilização de programas circulares na implementação de algoritmos de programação é uma técnica poderosa que permite, num paradigma lazy, implementar soluções que efectuam múltiplas travessias sobre uma ou mais estruturas de dados como um programa que efectua apenas uma travessia sobre uma única estrutura de dados. Num programa (virtualmente) circular podem ocorrer definições circulares, isto é, invocações de funções onde um argumento da invocação é, ao mesmo tempo, um resultado da mesma invocação. Embora este tipo de definições induza não terminação num paradigma estrito, a verdade é que, num paradigma lazy, elas podem ser desde logo executadas utilizando uma estratégia baseada em lazy evaluation: a máquina lazy é capaz de determinar o escalonamento correcto das computações, se ele existir. Na verdade, utilizando este método de programação, o(a) programador(a) não tem de definir nem de escalonar as diferentes travessias, uma vez que apenas uma função necessita de ser implementada. Para além disso, porque existe apenas função, e uma vez que essa função realiza apenas uma travessia, o(a) programador(a) também não é forçado a definir estruturas de dados intermédias para colar as diferentes travessias. Nesta Tese são apresentados os nossos estudos relativos ao desenho, implementação e cálculo de programas circulares. Começamos por desenvolver técnicas de transformação de programas circulares em programas estritos. Depois apresentamos regras de cálculo que permitem obter programas circulares a partir de estritos, equivalentes, tanto no contexto de funções puras como no contexto de funções monádicas. Uma vez que, neste trabalho, utilizamos técnicas de cálculo de programas, é possível garantir a correcção da transformação que propomos. Por fim, realizamos uma bateria de testes que permitem comparar a performance de programas circulares com a dos programas que derivamos a partir deles.Fundacão para a Ciência e Tecnologia (FCT)grant No. SFRH/BD/19186/200

    Zipper-based attribute grammars and their extensions

    Get PDF
    Lecture Notes in Computer Science Volume 8129, 2013.Attribute grammars are a suitable formalism to express complex software language analysis and manipulation algorithms, which rely on multiple traversals of the underlying syntax tree. Recently, Attribute Grammars have been extended with mechanisms such as references and high-order and circular attributes. Such extensions provide a powerful modular mechanism and allow the specification of complex fix-point computations. This paper defines an elegant and simple, zipper-based embedding of attribute grammars and their extensions as first class citizens. In this setting, language specifications are defined as a set of independent, off-the-shelf components that can easily be composed into a powerful, executable language processor. Several real examples of language specification and processing programs have been implemented in this setting

    Memoized zipper-based attribute grammars

    Get PDF
    Attribute Grammars are a powerfull, well-known formalism to implement and reason about programs which, by design, are conveniently modular.In this work we focus on a state of the art Zipper-based embedding of Attribute Grammars and further improve its performance through controlling attribute (re)evaluation by using memoization techniques. We present the results of our optimization by comparing their impact in various implementations of different, well-studied Attribute Grammars.- (undefined

    Bidirectional transformation of model-driven spreadsheets

    Get PDF
    Lecture Notes in Computer Science Volume 7307, 2012Spreadsheets play an important role in software organizations. Indeed, in large software organizations, spreadsheets are not only used to define sheets containing data and formulas, but also to collect information from diferent systems, to adapt data coming from one system to the format required by another, to perform operations to enrich or simplify data, etc. In fact, over time many spreadsheets turn out to be used for storing and processing increasing amounts of data and supporting increasing numbers of users. Unfortunately, spreadsheet systems provide poor support for modularity, abstraction, and transformation, thus, making the maintenance, update and evolution of spreadsheets a very complex and error-prone task. We present techniques for model-driven spreadsheet engineering where we employ bidirectional transformations to maintain spreadsheet models and instances synchronized. In our setting, the business logic of spreadsheets is defined by ClassSheet models to which the spreadsheet data conforms, and spreadsheet users may evolve both the model and the data instances. Our techniques are implemented as part of the MDSheet framework: an extension for a traditional spreadsheet system.(undefined

    Smelling faults in spreadsheets

    Get PDF
    Despite being staggeringly error prone, spreadsheets are a highly flexible programming environment that is widely used in industry. In fact, spreadsheets are widely adopted for decision making, and decisions taken upon wrong (spreadsheet-based) assumptions may have serious economical impacts on businesses, among other consequences. This paper proposes a technique to automatically pinpoint potential faults in spreadsheets. It combines a catalog of spreadsheet smells that provide a first indication of a potential fault, with a generic spectrum-based fault localization strategy in order to improve (in terms of accuracy and false positive rate) on these initial results. Our technique has been implemented in a tool which helps users detecting faults.To validate the proposed technique, we consider a wellknown and well-documented catalog of faulty spreadsheets. Our experiments yield two main results: we were able to distinguish between smells that can point to faulty cells from smells and those that are not capable of doing so; and we provide a technique capable of detecting a significant number of errors: two thirds of the cells labeled as faulty are in fact (documented) errors

    Dosimetric quality control at the radiotherapy department from Hospital CUF-Descobertas (HCD): the importance of quality control from the physics' sector and results of the auditorship ESTRO-EQUAL

    Get PDF
    A calibração e o controlo da qualidade de um acelerador linear são passos muito importantes num serviço de Radioterapia, para garantir a qualidade dos tratamentos prestados. O sector da Física da Unidade de Radioterapia do Hospital Cuf Descobertas implementou um rigoroso Programa de controlo de qualidade ao equipamento produtor de radiação e aos equipamentos medidores de radiação, de acordo com o Dec-Lei 180/2002 e com os protocolos internacionais. Para tal, foram implementados procedimentos, criadas folhas de cálculo, instruções de trabalho e impressos. Foram ainda implementados testes aos equipamentos com periodicidade definida: controlo de qualidade diário e controlo de qualidade após intervenções (manutenções preventivas e correctivas). No decorrer do ano de 2005, o sector da Física colaborou activamente com toda a equipa da Radioterapia na implementação da Norma ISO 9001:2000 no serviço, contribuindo com o seu know how na implementação desta, numa área tão importante como a da garantia da qualidade dos feixes de radiação e das respectivas calibrações em dose. Numa procura de melhoria contínua da qualidade dos serviços prestados aos pacientes, decorre ainda uma auditoria externa da EQUAL-ESTRO*, intercomparação postal com dosímetros termoluminescentes. A qualidade dos feixes de energias utilizados diariamente é analisada, tanto ao nível das calibrações absolutas de cada um dos feixes de fotões e de electrões, como ao nível dos cálculos de dose obtidos com o sistema de planimetria XiO da CMS. Os resultados das duas primeiras fases da intercomparação, relativa aos dois feixes de fotões de 6 MV e 15 MV e feixes de electrões de 4 MeV, 8 MeV e 12 MeV, foram considerados pela EQUAL-ESTRO num nível óptimo (desvio máximo na dose medida em relação à dose de referência |d| ≤ 3%).ABSTRACT - The calibration and the quality control of a linear accelerator are very important steps in a radiotherapy department, since they both guarantee the quality of patient treatment. In accordance with Dec-Law 180/2002 and with international protocols, the Physics’ sector of the Radiotherapy unit/department from Hospital Cuf-Descobertas implemented a rigorous program of quality control to the equipment that produces radiation as well as, to the measuring equipment of radiation. For that purpose, worksheets and instructions of work had been created. Still, tests to the equipment with definite regularity had been implemented such as: daily quality control and, quality control after interventions (preventive and corrective maintenances). In the year of 2005, in collaboration with the remainder Radiotherapy department the Norm ISO 9001:2000 was implemented. During this process the Physics’ sector contributed with its know how, in a so important area as is the one of quality control of radiation beams and, respective dose calibration. For the continuous improvement of the supplied services to the patients, an external auditorship of the EQUAL-ESTRO by postal intercomparison with thermoluminescents dosimeters, still elapses. The quality of the radiation beams that are daily used, are analysed in both fronts: absolute calibrations for all energies of photon and electron beams and, dose calculations with the treatment planning system XiO from CMS. The results of the two first phases of this intercomparison, two beams of photons of 6 MV and 15 MV and three beams of electrons of 4MeV, 8MeV and 12MeV, had been considered by the EQUAL-ESTRO in an excellent level (maximum deviation for the measured dose in relation to the dose of reference: |d| ≤ 3 %)

    Ranking programming languages by energy efficiency

    Get PDF
    This paper compares a large set of programming languages regarding their efficiency, including from an energetic point-of-view. Indeed, we seek to establish and analyze different rankings for programming languages based on their energy efficiency. The goal of being able to rank languages with energy in mind is a recent one, and certainly deserves further studies. We have taken 19 solutions to well defined programming problems, expressed in (up to) 27 programming languages, from well know repositories such as the Computer Language Benchmark Game and Rosetta Code. We have also built a framework to automatically, and systematically, run, measure and compare the efficiency of such solutions. Ultimately, it is based on such comparison that we propose a serious of efficiency rankings, based on multiple criteria. Our results show interesting findings, such as, slower/faster languages consuming less/more energy, and how memory usage influences energy consumption. We also show how to use our results to provide software engineers support to decide which language to use when energy efficiency is a concern(University of Porto) for the help that he provided. This work is financed by the ERDF – European Regional Development Fund through the Operational Programme for Competitiveness and Internationalisation - COMPETE 2020 Programme within project POCI-01-0145-FEDER-006961, and by National Funds through the Portuguese funding agency, FCT - Funda¸c˜ao para a Ciˆencia e a Tecnologia within project POCI-01-0145-FEDER-016718 and UID/EEA/50014/2013. The first and second authors are also sponsored by FCT grants SFRH/BD/112733/2015 and SFRH/BD/132485/201

    Evaluation of antifungal activity and potential application as fluorescent probes of indolenine and benzo[e]indole-based squarylium dyes

    Get PDF
    The antifungal performance and the possible use as fluorescent probes of a series of squarylium dyes derived from indolenine and benzo[e]indole previously synthesized was evaluated. Some photophysical properties were performed in ethanol and phosphate buffer, and the type of aggregates form in phosphate buffer was analyzed. Using the 1,3-diphenylisobenzofuran assay, a qualitative assessment of the capacity of dyes to produce singlet oxygen after irradiation was performed. Regarding the antifungal activity, this was studied through a broth microdilution assay using Saccharomyces cerevisiae PYCC 4072 as a biological model. The effect of irradiation of the dyes, with an appropriate light emitting diode system, on the antifungal activity was also evaluated, and it was verified that some of the dyes improve their activity after irradiation. Using fluorescence microscopy techniques, the colocalization of dyes in S. cerevisae cells was investigated and it was possible to verify that some of the squarylium dyes with a barbituric moiety in the four-membered central ring stained and accumulated preferentially in the mitochondrial web and perinuclear membrane of the cells. The possible use as a fluorescent probe for the detection of HSA was also evaluated for one of the dyes of the series, demonstrating a linear variation of the fluorescence intensity accompanied by the increase of the protein concentration.We thank to Fundação para a Ciência e Tecnologia (FCT), Comissão de Coordenação e Desenvolvimento Regional do Norte (CCDR-N) and FEDER (European Fund for Regional Development)-COMPETEQREN-EU for financial support to the research centers CQ/UM (UIDB/00686/2020), CBMA (UID/BIA/04050/2020), CQ/VR (UID/QUI/UI0616/2019) and CICSUBI (POCI-01-0145-FEDER-007491), as well as PhD grants to V.S.D.G. (UMINHO/BD/43/2016) and J.C.C.F. (SFRH/BD/133207/2017)

    projecto interdisciplinar/metodologias integradas

    Get PDF
    Depois de descrever e fundamentar a concepção do PIMI (Projecto Interdisciplinar/Metodologias integradas), apresenta-se um conjunto de intervenções elaboradas em equipes de 2 a 3 professores da ESELx referentes a projectos realizados nos jardins de infância cooperantes da prática pedagógica ao longo do ano lectivo de 2008/09. Com estas breves apresentações pretende-se cruzar a visão inter/multidisciplinar inerente ao trabalho de projecto com crianças (Katz e Chard, 2009) com os saberes e reflexões específicos das diferentes metodologias relativas às áreas de conteúdo tal como estão expressas nas Orientações Curriculares para a Educação Pré-Escolar (1997/2002). Apresentam-se reflexões a duas ou três mãos sobre projectos específicos que conduzem a uma visão crítica sobre como se constrói a transversalidade e a especificidade no currículo, isto é, como se constrói o conhecimento (Roldão, 2004). Finalmente, apontam-se alguns dados avaliativos do processo e tecem-se desafios finais e implicações para a supervisão da prática profissional do 2º ciclo de formação (Bolonha), à luz do Decreto-Lei nº 47 /2007 de 22 de Fevereiro. O Projecto Interdisciplinar/Metodologias Integradas (PIMI) dos cursos de Formação Inicial de Educadores de Infância da ESELx, na sua concepção original, terminará no ano lectivo de 2009/2010
    corecore